﻿using DocumentFormat.OpenXml.Lite.DrawingML.Geometry;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Visual
{
    [XmlRoot("gradFill", Namespace = Constants.Main)]
    public class GradientFill : XmlSerializable, ILineFillProperty
    {
        [Optional]
        [XmlAttribute("flip", Form = XmlSchemaForm.Qualified)]
        public Nullable<ST_TileFlipMode> TileFlipMode { get; set; }

        [Optional]
        [XmlAttribute("rotWithShape", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> RotateWithShape { get; set; }

        [Optional]
        [XmlElement("gsLst", Namespace = Constants.Main)]
        public GradientStopList GradientStopList { get; set; }

        [Optional]
        [XmlElement("", Namespace = Constants.Main)]
        public IShadeProperty ShadeProperty { get; set; }

        [Optional]
        [XmlElement("tilRect", Namespace = Constants.Main)]
        public Rectangle TileRectangle { get; set; }

        public GradientFill() { }
    }
}
